<template>
<!-- 	<swiper>
		<swiper-item v-for="item in banners">
			<a :href="item.link">
				<img :src="item.image" alt="" @load="imageload">
			</a>
		</swiper-item>
	</swiper> -->
	
	<van-swipe class="my-swipe" :autoplay="2000" indicator-color="white">
	  <van-swipe-item v-for="item in banners">
			<a href="#">
				<img :src="item.image" @load="imageload" alt="">
			</a>
		</van-swipe-item>
	</van-swipe>
</template>

<script scoped>
	//import {Swiper,SwiperItem} from 'components/common/swiper/index.js'

	export default{
		name:'HomeSwiper',
		// components: {
		// 	Swiper,
		// 	SwiperItem
		// },
		props:{
			banners:{
				type:Array,
				default(){
					return []
				}
			}
		},
		data(){
			return{
				isLoad:false
			}
		},
		methods: {
			imageload(){
				this.$emit('swiperImageload')
				this.isLoad = true //只想让它多次发生事件
			}
		}
	}
</script>

<style scoped>
	img{
		width: 100%;
	}
</style>
